/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lucava.importer.uspeed.matcher;

import java.util.regex.MatchResult;
import java.util.regex.Matcher;

/**
 *
 * @author glenn
 */
public abstract class MatcherDecorator implements MatchResult {

    protected MatchResult matcher;

    public MatcherDecorator(MatchResult matcher) {
        this.matcher = matcher;
    }

    @Override
    public int end() {
        return matcher.end();
    }

    @Override
    public int end(int group) {
        return matcher.end(group);
    }

    @Override
    public String group() {
        return matcher.group();
    }

    @Override
    public String group(int group) {
        return matcher.group(group);
    }

    @Override
    public int groupCount() {
        return matcher.groupCount();
    }

    @Override
    public int start() {
        return matcher.start();
    }

    @Override
    public int start(int group) {
        return matcher.start(group);
    }

    public void debug() {
        System.out.println(getClass().getSimpleName() + " : DEBUG");
        for (int i = 0; i < matcher.groupCount(); i++) {
            System.out.println(i + " : " + matcher.group(i));
        }
        System.out.println();
    }
}
